#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>

using namespace std;
int main() {
    int count;
    cin>>count;
    for (int i = 0; i < count; i++) {
        long long num ;
        cin>>num;
        long long jsh=0,osh=0;
        for (int j = 1; j <= num; j++) {
            if (j%2==0){
                osh+=j;
            }else {
                jsh+=j;
            }
        }
        cout<<osh*jsh<<endl;
    }
    return 0;
}
